<template>
  <div class="strut-div"><div class="strut-div" id="keyWordCloud"></div></div>
</template>

<script>
import '../../../../static/echarts-wordcloud.min.js';
import echarts from 'echarts';
export default {
  data() {
    return {
      chart: null,
      option: null
    };
  },
  mounted() {
    this.chart = echarts.init(document.getElementById('keyWordCloud'));

    this.option = {
      series: [
        {
          type: 'wordCloud',
          //size: ['9%', '99%'],
          sizeRange: [20, 66],
          //textRotation: [0, 45, 90, -45],
          rotationRange: [0, 0],
          //shape: 'circle',
          textPadding: 0,
          autoSize: {
            enable: true,
            minSize: 6
          },
          textStyle: {
            normal: {
              // color: function() {
              //   return 'rgb(' + [Math.round(Math.random() * 160), Math.round(Math.random() * 160), Math.round(Math.random() * 160)].join(',') + ')';
              // }
              color:'#00EAFF'
            },
            emphasis: {
              shadowBlur: 10,
              shadowColor: '#333'
            }
          },
          data: [
            {
              name: '八项规定',
              value: '999'
            },
            {
              name: '四个“合格”',
              value: '888'
            },
            {
              name: '四个“铁一般”',
              value: '777'
            },
            {
              name: '监督执纪“四种形态”',
              value: '688'
            },
            {
              name: '“两学一做”',
              value: '588'
            },
            {
              name: '四大“目标”',
              value: '516'
            },
            {
              name: '四个“全面战略布局”',
              value: '515'
            },
            {
              name: '三个“高压态势”',
              value: '483'
            },
            {
              name: '“四讲四有”',
              value: '462'
            },
            {
              name: '好干部“五条标准”',
              value: '449'
            },
            {
              name: '两个“倍增”',
              value: '429'
            },
            {
              name: '两个牢牢把握着',
              value: '407'
            },
            {
              name: '反“四风”',
              value: '406'
            },
            {
              name: '三个“确保”',
              value: '406'
            }
          ]
        }
      ]
    };
    this.chart.setOption(this.option);
  }
};
</script>

<style></style>
